package com.ocm.product.feign;

import com.ocm.core.launch.constant.AppConstant;
import com.ocm.core.tool.api.R;
import com.ocm.order.dto.OrderDetailDTO;
import com.ocm.product.entity.Spu;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(
	value = AppConstant.APPLICATION_PRODUCT_NAME,
	fallback = ISpuClientFallback.class
)
public interface ISpuClient {
	String API_PREFIX = "/spu";

	@GetMapping(API_PREFIX + "/getSpu")
	R<Spu> getSpu(@RequestParam("id") Long id);

	@GetMapping(API_PREFIX+"/getOrderData")
	R<OrderDetailDTO> getOrderData(@RequestParam("skuId") Long skuId);
}

